package cz.proks.bank.tester;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import cz.proks.bank.service.clientservice.ClientService;
import cz.proks.bank.service.clientservice.ClientService_Service;

public class ClientServiceTester {
	ClientService clientService;	
	
	@Before
	public void init() {
		clientService = new ClientService_Service().getClientServicePort();
	}

	@Test
	public void serviceInitialized() {
		Assert.assertNotNull(clientService);
	}
	
	@Test
	public void createAccount() {
		try {
			int i  = clientService.setUpAccount("My account", "CZK");
			Assert.assertTrue(i > 0);
		} catch (Exception e) {
			Assert.fail(e.getMessage());
		}		
	}	
}
